<?php
    /**
     * Created by PhpStorm.
     * User: lance
     * Date: 2017/10/26
     * Time: 15:31
     */

    namespace app\customer\validate;
    use think\Validate;

    /**
     * 用户贷款
     * Class Loan
     * @package app\customer\validate
     */
    class CustomerLoan extends Validate
    {
        protected $rule = [
            'number|借据号' => "require",
            "money|借款金额" =>'require|gt:0',
            "time|贷款时间" => "require",
            "loan_time|贷款时长" => "number|egt:1",
            "customer_id|用户ID" => "require|number|egt:1"
        ];
        protected $scene=[
            'number' => ['number'],
            'money' => ['money'],
            'time' => ['time'],
            'loan_time' => ['loan_time']
        ];
    }